Skip to content

fix(libc): list the directory once for a missing path that may be a relinked module - #6230

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/relinked-name-scan
Oct 15, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/relinked-name-scan

Conversation

@oneandonlydean

Copy link
Copy Markdown
Collaborator

What

Since #5434, a read-only open, sceKernelStat or sceKernelCheckReachability of a missing path lists its directory twice: once in ResolveHostPath for a case-insensitive match of the name, and again in RelinkedModulePath_nid_no_patch for <name>.guest.prx. Both names are now matched in the same listing. Which path is returned and the ambiguous-name errors stay the same as after #5434. RelinkedModulePath_nid_no_patch is unchanged for the dynamic loader.

Tested

Linux, RTX GPU. A title that probes ~17k missing files in directories of up to 11k entries while it loads its first level: the second listing cost 12.1 s (16,764 listings) between pressing Start and the level starting. Frames from the second press to the level start, alternating runs with warm caches: main 634 / 599 / 589, this PR 377 / 366 / 376. In-level FPS unchanged. A second title shows no change. The new guest_filesystem check (one directory open per missing-path lookup, plus the ambiguous .guest.prx throw) fails on main and passes here. ctest guest|libc|libkernel|filesystem|agc_: 948/948 pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

…elinked module

A read-only open, stat or reachability check of a missing path listed its
directory twice: once for a case-insensitive match of the name and again for
a case-insensitive match of the relinked <name>.guest.prx (boykopovar#5434). Both
names are now matched in the same listing. Precedence and the ambiguous-name
errors are unchanged.
@github-actions

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5280 core/libs/prx/libc/src/General.cpp L126-129
#5835 core/libs/prx/libc/include/FilesystemError.hpp L28, L30
core/libs/prx/libc/include/General.hpp L20
core/libs/prx/libc/src/General.cpp L150
core/libs/prx/libkernel/File/src/Open.cpp L224-225, L305-306
core/libs/prx/libkernel/File/src/Stdio.cpp L878-879
#6061 core/libs/prx/libc/src/General.cpp L74-75, L78-79, L85-93, L108-109, L127-129, L149-150, L156, L168
#6132 core/libs/prx/libkernel/File/src/Open.cpp L224-226
#6226 core/libs/prx/libc/src/General.cpp L388, L393-402

@oneandonlydean
oneandonlydean merged commit 2848b55 into boykopovar:main Oct 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant